﻿using System;
using System.Web;
using System.Security.Cryptography;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Configuration;

namespace   NxPartyAffairsOpen
{
    public class Config
    {
        public static string IPSConnectionKey
        {
            get
            {
                return ConfigurationManager.AppSettings["Wicresoft.IPS.ConnectionString"];
            }
        }
        public static string IPSServer
        {
            get
            {
                return ConfigurationManager.AppSettings["IPSServer"];
            }
        }
        public static string IPSFileStore
        {
            get
            {
                return ConfigurationManager.AppSettings["IPSFileStore"];
            }
        }
        public static string IPSAppName
        {
            get
            {
                return ConfigurationManager.AppSettings["IPSAppName"];
            }
        }
        public static Guid AppID
        {
            get
            {
                return new Guid(ConfigurationManager.AppSettings["AppID"]);
            }
        }
        public static Guid DangWuDongTaiID
        {
            get
            {
                return new Guid(ConfigurationManager.AppSettings["DangWuDongTaiID"]);
            }
        }
        public static string IPSAttachmentUrl
        {
            get
            {
                return ConfigurationManager.AppSettings["IPSAttachmentUrl"];
            }
        }
        public static Guid DangWuFengCaiID
        {
            get
            {
                return new Guid(ConfigurationManager.AppSettings["DangWuFengCaiID"]);
            }
        }

        public static Guid DangWuGongGaoID
        {
            get
            {
                return new Guid(ConfigurationManager.AppSettings["DangWuGongGaoID"]);
            }
        }

        public static Guid TopCategoryID
        {
            get
            {
                return new Guid(ConfigurationManager.AppSettings["TopCategoryID"]);
            }
        }

        public static Guid LowCategoryID
        {
            get
            {
                return new Guid(ConfigurationManager.AppSettings["LowCategoryID"]);
            }
        }

        public static List<Guid> MiddleCategoryIDs
        {
            get
            {

                string[] ids = ConfigurationManager.AppSettings["MiddleCategoryIDs"].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

                List<Guid> list = new List<Guid>();
                foreach (string item in ids)
                {
                    list.Add(new Guid(item));
                }
                return list;
            }
        }
    }
}